There are known library devices in which a plurality of medium cartridges (recording media) such as magnetic tape cartridges and optical disk cartridges are stored. In a library device, medium cartridges are stored in units of cells in a plurality of storage cells arranged inside a housing.
The library device picks up, transports, and places (inserts) medium cartridges between housing cells and drive modules by using transfer robots based on movement instructions from a host, thereby recording and reproducing media placed into the drive modules.
A barcode label on which a barcode containing medium management information is marked is affixed to the cartridge back of a medium cartridge and is read by a barcode reader mounted on a transfer robot. The barcode reader includes a light emitting diode (LED) lighting unit in which LEDs are arranged in a line layout, and a charge coupled device (CCD) linear sensor. In a state where the transfer robot faces the cartridge back (barcode label), the library device turns on the LED lighting unit, performs scanning by using the CCD linear sensor, and decodes a scanning result. Thus, the library device may read a barcode (acquire medium management information).
In the library device, upon startup of the device or according to an instruction from a host, an inventory process is performed in which, for a stored medium cartridge, medium management information and positional information are managed (registered) in association with each other.
In the inventory process, the library device continuously reads barcode labels of multiple medium cartridges stored therein and notifies the host of what positions in the device the medium cartridges are stored. For example, after the library device moves and positions the transfer robot at the top or bottom cell position in a column to be processed (a vertical line of the storage cell), the library device moves the transfer robot downward or upward at a regular speed while causing the barcode reader to perform scanning operations. Thus, the library device continuously reads the barcode labels of the medium cartridges.
Regarding a method for reading barcodes, various techniques are known (refer to, for example, International Publication Pamphlet No. WO 2005/004142, Japanese Laid-open Patent Publication No. 08-044809, Japanese Laid-open Patent Publication No. 05-089278, and Japanese Laid-open Patent Publication No. 2002-032711).
However, various factors in an environment where a barcode reader reads a barcode cause read errors or incorrect recognition, and, as a result, the barcode is sometimes not correctly read. In such a case, although retry processing in which a read operation is performed again may be carried out, movement of the transfer robot is a mechanical operation and therefore the response time to the host may be delayed by the retry processing.
In particular, in a large-scale library device, medium cartridges stored therein sometimes reach several hundreds. The larger the number of medium cartridges stored is, the longer the time used for the inventory process is. Therefore, when, in the inventory process, barcodes are not correctly read and retry processing occurs frequently, notification to the host is substantially delayed. Thus, it takes a large amount of time to make the library device available again.